import closeDialog from './close-dialog';
import openDialog from './open-dialog';
import openAgainDialog from './open-agai-dialog';

export default {
	components: {
		closeDialog,
		openDialog,
		openAgainDialog
	},
	data() {
		return {
			openAgainDialogState: false,
			openDialogState: false,
			closeDialogState: false,
			selectMachineItem: {},
			openOperationType: 1

		};
	},
	methods: {
		onOpenAgainBtn(row) {
			this.selectMachineItem = row;
			this.openAgainDialogState = true;
		},
		onRenovateAndOpenBtn(row) {
			this.openOperationType = 2;
			this.selectMachineItem = row;
			this.openDialogState = true;
		},
		onCloseBtn(row) {
			this.selectMachineItem = row;
			this.closeDialogState = true;
		},
		onOpenBtn(row) {
			this.openOperationType = 1;
			this.selectMachineItem = row;
			this.openDialogState = true;
		},
		onConfirmChangeOfCloseDialog() {
			this.closeDialogState = false;
			this.getListRequest();
		},
		onVisibleChangeOfCloseDialog(e) {
			this.closeDialogState = e;
		},
		onConfirmChangeOfOpenDialog() {
			this.openDialogState = false;
			this.getListRequest();
		},
		onVisibleChangeOfOpenDialog(e) {
			this.openDialogState = e;
		},
		onConfirmChangeOfOpenAgainDialog() {
			this.openAgainDialogState = false;
			this.getListRequest();
		},
		onVisibleChangeOfOpenAgainDialog(e) {
			this.openAgainDialogState = e;
		}
	}
};
